{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "5fa96982-7460-4b55-b6dd-f3a1be6b1ae3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3×4的数组 [[110 120  90  80]\n",
      " [ 89  95  77  92]\n",
      " [ 60  79  96  80]]\n",
      "[[ 60  79  96  80]\n",
      " [110 120  90  80]]\n",
      "[ 96 110]\n",
      "[90 89 95 92 96]\n",
      "[80 77 60 79 80]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "arr = np.array([[110,120,90,80],[89,95,77,92],[60,79,96,80]])\n",
    "print('3×4的数组',arr)\n",
    "\n",
    "print('第3行和第1行的元素',arr[[2,0]])\n",
    "\n",
    "print('第3行第2列和第1行第1列的元素',arr[[2,0],[2,0]])\n",
    "\n",
    "print('大于80且小于等于100的所有元素',arr[(arr>80)&(arr<=100)])\n",
    "\n",
    "print('小于等于80的所有元素',arr[arr<=80])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "744f018c-733b-4029-bd71-35748ecd4caa",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
